proc msg:broadcast {nick host handle arg} {
  global botnick 

  set botnet [lrange $arg 0 end]

  # If user is not global user...
  if {![matchattr $handle o]} {
    putquick "NOTICE $nick :\0034ERROR - Permission Denied."
    return 0
  }

  # If user is not authed...
  if {![matchattr $handle A]} {
    putquick "NOTICE $nick :\0034ERROR - You need to authenticate first - Permission Denied."           
    putquick "NOTICE $nick :\00312You may authenticate yourself by typing \0033\002/msg $botnick auth <your password>\002"
    return 0
  }

  # If user account is disabled...
  if {[matchattr $handle D]} {
    putquick "NOTICE $nick :\0034ERROR - Permission Denied - Access Is Disabled."
    return 0
  }
  
  broadcast $nick $host $botnet
  return 0
}









